feat(java): add deserial object with feature deserializeNonexistentClassNotWriteFullClassInfo feature#1932
Open
shuyufang wants to merge 3 commits intoapache:mainfrom
Open
Conversation
chaokunyang
reviewed
Nov 7, 2024
| ClassFieldsInfo fieldsInfo = getClassFieldsInfo(classDef); | ||
| ObjectSerializer.FinalTypeField[] finalFields = fieldsInfo.finalFields; | ||
| boolean[] isFinal = fieldsInfo.isFinal; | ||
| Config config = fury.getConfig(); |
Collaborator
There was a problem hiding this comment.
We'd better get the option here, and pass that flag to getFileName method
chaokunyang
reviewed
Nov 7, 2024
| if (index < 0) { | ||
| return qualifiedFieldName; | ||
| } | ||
| return qualifiedFieldName.substring(index + 1); |
Collaborator
There was a problem hiding this comment.
This will create a new string everytime for deserialization, which is very slow. A better method is rename fieldInfo#qualifiedFieldName into fieldInfo#fieldName, and build it as qualified based on the option.
Collaborator
There was a problem hiding this comment.
And we should skip duplicated field name in super class if this option is enabled
Collaborator
|
@shuyufang Seems we can refactor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ullClassInfo
What does this PR do?
we has some scene , after the class with the upstream system serialized, the downstream system can not deserialize without the class object, but current .withDeserializeNonexistentClass write the full class info. we want fury support deserialize object when none local class can deserializeNonexistentClassNotWriteFullClassInfo feature
Related issues
Does this PR introduce any user-facing change?
Benchmark